doc: Remove repetitive "Give grep a chance" phrase from comments
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 28 Aug 2013 00:38:27 +0000 (17:38 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 29 Aug 2013 17:46:46 +0000 (10:46 -0700)
* Follows-up b2e2b2e016.
* Minor clean up of surrounding documentation comments.
* Fixed missing keys for messages in WebInstallerPage

Change-Id: Iaa692064262f3c0e10cfa5e4b1ec8c86e5d02362

20 files changed:
includes/CategoryViewer.php
includes/EditPage.php
includes/Preferences.php
includes/ProtectionForm.php
includes/Skin.php
includes/SkinTemplate.php
includes/User.php
includes/UserMailer.php
includes/actions/InfoAction.php
includes/installer/CliInstaller.php
includes/installer/DatabaseInstaller.php
includes/installer/Installer.php
includes/installer/WebInstaller.php
includes/installer/WebInstallerPage.php
includes/job/jobs/DoubleRedirectJob.php
includes/specials/SpecialJavaScriptTest.php
includes/specials/SpecialProtectedpages.php
includes/specials/SpecialProtectedtitles.php
includes/specials/SpecialUserrights.php
languages/Language.php

index 5b6694f..55d9c1e 100644 (file)
@@ -660,20 +660,20 @@ class CategoryViewer extends ContextSource {
         * @param int $rescnt The number of items returned by our database query.
         * @param int $dbcnt The number of items according to the category table.
         * @param string $type 'subcat', 'article', or 'file'
-        * @return String: A message giving the number of items, to output to HTML.
+        * @return string: A message giving the number of items, to output to HTML.
         */
        private function getCountMessage( $rescnt, $dbcnt, $type ) {
-               # There are three cases:
-               #   1) The category table figure seems sane.  It might be wrong, but
-               #      we can't do anything about it if we don't recalculate it on ev-
-               #      ery category view.
-               #   2) The category table figure isn't sane, like it's smaller than the
-               #      number of actual results, *but* the number of results is less
-               #      than $this->limit and there's no offset.  In this case we still
-               #      know the right figure.
-               #   3) We have no idea.
-
-               # Check if there's a "from" or "until" for anything
+               // There are three cases:
+               //   1) The category table figure seems sane.  It might be wrong, but
+               //      we can't do anything about it if we don't recalculate it on ev-
+               //      ery category view.
+               //   2) The category table figure isn't sane, like it's smaller than the
+               //      number of actual results, *but* the number of results is less
+               //      than $this->limit and there's no offset.  In this case we still
+               //      know the right figure.
+               //   3) We have no idea.
+
+               // Check if there's a "from" or "until" for anything
 
                // This is a little ugly, but we seem to use different names
                // for the paging types then for the messages.
@@ -693,23 +693,22 @@ class CategoryViewer extends ContextSource {
                if ( $dbcnt == $rescnt ||
                        ( ( $rescnt == $this->limit || $fromOrUntil ) && $dbcnt > $rescnt )
                ) {
-                       # Case 1: seems sane.
+                       // Case 1: seems sane.
                        $totalcnt = $dbcnt;
                } elseif ( $rescnt < $this->limit && !$fromOrUntil ) {
-                       # Case 2: not sane, but salvageable.  Use the number of results.
-                       # Since there are fewer than 200, we can also take this opportunity
-                       # to refresh the incorrect category table entry -- which should be
-                       # quick due to the small number of entries.
+                       // Case 2: not sane, but salvageable.  Use the number of results.
+                       // Since there are fewer than 200, we can also take this opportunity
+                       // to refresh the incorrect category table entry -- which should be
+                       // quick due to the small number of entries.
                        $totalcnt = $rescnt;
                        $this->cat->refreshCounts();
                } else {
-                       # Case 3: hopeless.  Don't give a total count at all.
-                       # Give grep a chance to find the usages: category-subcat-count-limited,
-                       # category-article-count-limited, category-file-count-limited
+                       // Case 3: hopeless.  Don't give a total count at all.
+                       // Messages: category-subcat-count-limited, category-article-count-limited,
+                       // category-file-count-limited
                        return $this->msg( "category-$type-count-limited" )->numParams( $rescnt )->parseAsBlock();
                }
-               # Give grep a chance to find the usages:
-               # category-subcat-count, category-article-count, category-file-count
+               // Messages: category-subcat-count, category-article-count, category-file-count
                return $this->msg( "category-$type-count" )->numParams( $rescnt, $totalcnt )->parseAsBlock();
        }
 }
index ec9f6ba..63e3e66 100644 (file)
@@ -972,7 +972,7 @@ class EditPage {
                                                $undoMsg = 'norev';
                                        }
 
-                                       // Give grep a chance to find the usages: undo-success, undo-failure, undo-norev
+                                       // Messages: undo-success, undo-failure, undo-norev
                                        $class = ( $undoMsg == 'success' ? '' : 'error ' ) . "mw-undo-{$undoMsg}";
                                        $this->editFormPageTop .= $wgOut->parse( "<div class=\"{$class}\">" .
                                                wfMessage( 'undo-' . $undoMsg )->plain() . '</div>', true, /* interface */true );
index 84a3b7e..fc13a65 100644 (file)
@@ -987,7 +987,7 @@ class Preferences {
 
                foreach ( $watchTypes as $action => $pref ) {
                        if ( $user->isAllowed( $action ) ) {
-                               // Give grep a chance to find the usages:
+                               // Messages:
                                // tog-watchdefault, tog-watchmoves, tog-watchdeletion, tog-watchcreations
                                $defaultPreferences[$pref] = array(
                                        'type' => 'toggle',
index fa02fb8..061ed2c 100644 (file)
@@ -363,9 +363,9 @@ class ProtectionForm {
                        Xml::openElement( 'table', array( 'id' => 'mwProtectSet' ) ) .
                        Xml::openElement( 'tbody' );
 
+               // Not all languages have V_x <-> N_x relation
                foreach ( $this->mRestrictions as $action => $selected ) {
-                       /* Not all languages have V_x <-> N_x relation */
-                       // Give grep a chance to find the usages:
+                       // Messages:
                        // restriction-edit, restriction-move, restriction-create, restriction-upload
                        $msg = wfMessage( 'restriction-' . $action );
                        $out .= "<tr><td>" .
index b714886..26cac58 100644 (file)
@@ -82,8 +82,7 @@ abstract class Skin extends ContextSource {
        static function getSkinNameMessages() {
                $messages = array();
                foreach ( self::getSkinNames() as $skinKey => $skinName ) {
-                       // Give grep a chance to find the usages:
-                       // skinname-cologneblue, skinname-monobook, skinname-modern, skinname-vector
+                       // Messages: skinname-cologneblue, skinname-monobook, skinname-modern, skinname-vector
                        $messages[] = "skinname-$skinKey";
                }
                return $messages;
index 2739df3..eafe233 100644 (file)
@@ -291,8 +291,8 @@ class SkinTemplate extends Skin {
                if ( $out->isSyndicated() ) {
                        $feeds = array();
                        foreach ( $out->getSyndicationLinks() as $format => $link ) {
-                               // Give grep a chance to find the usages: feed-atom, feed-rss
                                $feeds[$format] = array(
+                                       // Messages: feed-atom, feed-rss
                                        'text' => $this->msg( "feed-$format" )->text(),
                                        'href' => $link
                                );
index 25b35b3..f421237 100644 (file)
@@ -3759,8 +3759,7 @@ class User {
                } elseif ( $type === true ) {
                        $message = 'confirmemail_body_changed';
                } else {
-                       // Give grep a chance to find the usages:
-                       // confirmemail_body_changed, confirmemail_body_set
+                       // Messages: confirmemail_body_changed, confirmemail_body_set
                        $message = 'confirmemail_body_' . $type;
                }
 
index 0c880d6..8ab10b2 100644 (file)
@@ -751,14 +751,17 @@ class EmailNotification {
                # Replace this after transforming the message, bug 35019
                $postTransformKeys['$PAGESUMMARY'] = $this->summary == '' ? ' - ' : $this->summary;
 
-               # Now build message's subject and body
-               # Give grep a chance to find the usages: enotif_subject_deleted, enotif_subject_created,
-               # enotif_subject_moved, enotif_subject_restored, enotif_subject_changed
+               // Now build message's subject and body
+
+               // Messages:
+               // enotif_subject_deleted, enotif_subject_created, enotif_subject_moved,
+               // enotif_subject_restored, enotif_subject_changed
                $this->subject = wfMessage( 'enotif_subject_' . $this->pageStatus )->inContentLanguage()
                        ->params( $pageTitle, $keys['$PAGEEDITOR'] )->text();
 
-               # Give grep a chance to find the usages: enotif_body_intro_deleted, enotif_body_intro_created,
-               # enotif_body_intro_moved, enotif_body_intro_restored, enotif_body_intro_changed
+               // Messages:
+               // enotif_body_intro_deleted, enotif_body_intro_created, enotif_body_intro_moved,
+               // enotif_body_intro_restored, enotif_body_intro_changed
                $keys['$PAGEINTRO'] = wfMessage( 'enotif_body_intro_' . $this->pageStatus )
                        ->inContentLanguage()->params( $pageTitle, $keys['$PAGEEDITOR'], $pageTitleUrl )
                        ->text();
index 1fe19d5..704dee4 100644 (file)
@@ -116,7 +116,7 @@ class InfoAction extends FormlessAction {
 
                // Render page information
                foreach ( $pageInfo as $header => $infoTable ) {
-                       // Give grep a chance to find the usages:
+                       // Messages:
                        // pageinfo-header-basic, pageinfo-header-edits, pageinfo-header-restrictions,
                        // pageinfo-header-properties, pageinfo-category-info
                        $content .= $this->makeHeader( $this->msg( "pageinfo-${header}" )->escaped() ) . "\n";
@@ -281,8 +281,8 @@ class InfoAction extends FormlessAction {
 
                // Use robot policy logic
                $policy = $this->page->getRobotPolicy( 'view', $pOutput );
-               // Give grep a chance to find the usages: pageinfo-robot-index, pageinfo-robot-noindex
                $pageInfo['header-basic'][] = array(
+                       // Messages: pageinfo-robot-index, pageinfo-robot-noindex
                        $this->msg( 'pageinfo-robot-policy' ), $this->msg( "pageinfo-robot-${policy['index']}" )
                );
 
@@ -397,8 +397,7 @@ class InfoAction extends FormlessAction {
                                $message = $this->msg( 'protect-default' )->escaped();
                        } else {
                                // Administrators only
-                               // Give grep a chance to find the usages:
-                               // protect-level-autoconfirmed, protect-level-sysop
+                               // Messages: protect-level-autoconfirmed, protect-level-sysop
                                $message = $this->msg( "protect-level-$protectionLevel" );
                                if ( $message->isDisabled() ) {
                                        // Require "$1" permission
@@ -408,8 +407,8 @@ class InfoAction extends FormlessAction {
                                }
                        }
 
-                       // Give grep a chance to find the usages:
-                       // restriction-edit, restriction-move, restriction-create, restriction-upload
+                       // Messages: restriction-edit, restriction-move, restriction-create,
+                       // restriction-upload
                        $pageInfo['header-restrictions'][] = array(
                                $this->msg( "restriction-$restrictionType" ), $message
                        );
index d4e19f6..9f7ed7b 100644 (file)
@@ -137,9 +137,8 @@ class CliInstaller extends Installer {
        }
 
        public function startStage( $step ) {
-               // Give grep a chance to find the usages: config-install-database, config-install-tables,
-               // config-install-interwiki, config-install-stats, config-install-keys, config-install-sysop,
-               // config-install-mainpage
+               // Messages: config-install-database, config-install-tables, config-install-interwiki,
+               // config-install-stats, config-install-keys, config-install-sysop, config-install-mainpage
                $this->showMessage( "config-install-$step" );
        }
 
index 13d5d42..ca4ef97 100644 (file)
@@ -335,8 +335,8 @@ abstract class DatabaseInstaller {
         * @return String
         */
        public function getReadableName() {
-               // Give grep a chance to find the usages:
-               // config-type-mysql, config-type-postgres, config-type-sqlite, config-type-oracle
+               // Messages: config-type-mysql, config-type-postgres, config-type-sqlite,
+               // config-type-oracle
                return wfMessage( 'config-type-' . $this->getName() )->text();
        }
 
index 04d2b20..afd2e3d 100644 (file)
@@ -661,8 +661,8 @@ abstract class Installer {
 
                $allNames = array();
 
-               // Give grep a chance to find the usages:
-               // config-type-mysql, config-type-postgres, config-type-oracle, config-type-sqlite
+               // Messages: config-type-mysql, config-type-postgres, config-type-oracle,
+               // config-type-sqlite
                foreach ( self::getDBTypes() as $name ) {
                        $allNames[] = wfMessage( "config-type-$name" )->text();
                }
index da84316..9fcd312 100644 (file)
@@ -516,7 +516,7 @@ class WebInstaller extends Installer {
        /**
         * Called by execute() before page output starts, to show a page list.
         *
-        * @param $currentPageName String
+        * @param $currentPageName string
         */
        private function startPageWrapper( $currentPageName ) {
                $s = "<div class=\"config-page-wrapper\">\n";
@@ -539,8 +539,10 @@ class WebInstaller extends Installer {
 
                $s .= "</ul><br/><ul>\n";
                $s .= $this->getPageListItem( 'Restart', true, $currentPageName );
-               $s .= "</ul></div>\n"; // end list pane
-               // Give grep a chance to find the usages:
+               // End list pane
+               $s .= "</ul></div>\n";
+
+               // Messages:
                // config-page-language, config-page-welcome, config-page-dbconnect, config-page-upgrade,
                // config-page-dbsettings, config-page-name, config-page-options, config-page-install,
                // config-page-complete, config-page-restart, config-page-readme, config-page-releasenotes,
@@ -554,15 +556,16 @@ class WebInstaller extends Installer {
        /**
         * Get a list item for the page list.
         *
-        * @param $pageName String
-        * @param $enabled Boolean
-        * @param $currentPageName String
+        * @param $pageName string
+        * @param $enabled boolean
+        * @param $currentPageName string
         *
         * @return string
         */
        private function getPageListItem( $pageName, $enabled, $currentPageName ) {
                $s = "<li class=\"config-page-list-item\">";
-               // Give grep a chance to find the usages:
+
+               // Messages:
                // config-page-language, config-page-welcome, config-page-dbconnect, config-page-upgrade,
                // config-page-dbsettings, config-page-name, config-page-options, config-page-install,
                // config-page-complete, config-page-restart, config-page-readme, config-page-releasenotes,
index a017894..510ea6c 100644 (file)
@@ -74,6 +74,10 @@ abstract class WebInstallerPage {
                );
        }
 
+       /**
+        * @param string|bool $continue
+        * @param string|bool $back
+        */
        public function endForm( $continue = 'continue', $back = 'back' ) {
                $s = "<div class=\"config-submit\">\n";
                $id = $this->getId();
@@ -84,14 +88,14 @@ abstract class WebInstallerPage {
 
                if ( $continue ) {
                        // Fake submit button for enter keypress (bug 26267)
-                       // Give grep a chance to find the usages: config-continue
+                       // Messages: config-continue, config-restart, config-regenerate
                        $s .= Xml::submitButton( wfMessage( "config-$continue" )->text(),
                                array( 'name' => "enter-$continue", 'style' =>
                                        'visibility:hidden;overflow:hidden;width:1px;margin:0' ) ) . "\n";
                }
 
                if ( $back ) {
-                       // Give grep a chance to find the usages: config-back
+                       // Message: config-back
                        $s .= Xml::submitButton( wfMessage( "config-$back" )->text(),
                                array(
                                        'name' => "submit-$back",
@@ -100,7 +104,7 @@ abstract class WebInstallerPage {
                }
 
                if ( $continue ) {
-                       // Give grep a chance to find the usages: config-continue
+                       // Messages: config-continue, config-restart, config-regenerate
                        $s .= Xml::submitButton( wfMessage( "config-$continue" )->text(),
                                array(
                                        'name' => "submit-$continue",
@@ -457,8 +461,8 @@ class WebInstaller_DBConnect extends WebInstallerPage {
                $settings = '';
                $defaultType = $this->getVar( 'wgDBtype' );
 
-               // Give grep a chance to find the usages:
-               // config-support-mysql, config-support-postgres, config-support-oracle, config-support-sqlite
+               // Messages: config-support-mysql, config-support-postgres, config-support-oracle,
+               // config-support-sqlite
                $dbSupport = '';
                foreach ( $this->parent->getDBTypes() as $type ) {
                        $link = DatabaseBase::factory( $type )->getSoftwareLink();
@@ -488,8 +492,8 @@ class WebInstaller_DBConnect extends WebInstallerPage {
                                ) .
                                "</li>\n";
 
-                       // Give grep a chance to find the usages:
-                       // config-header-mysql, config-header-postgres, config-header-oracle, config-header-sqlite
+                       // Messages: config-header-mysql, config-header-postgres, config-header-oracle,
+                       // config-header-sqlite
                        $settings .=
                                Html::openElement( 'div', array( 'id' => 'DB_wrapper_' . $type,
                                                'class' => 'dbWrapper' ) ) .
@@ -1131,10 +1135,10 @@ class WebInstaller_Options extends WebInstallerPage {
                                return false;
                        }
                } elseif ( in_array( $code, array_keys( $this->parent->licenses ) ) ) {
-                       // Give grep a chance to find the usages:
+                       // Messages:
                        // config-license-cc-by, config-license-cc-by-sa, config-license-cc-by-nc-sa,
-                       // config-license-cc-0, config-license-pd, config-license-gfdl,
-                       // config-license-none, config-license-cc-choose
+                       // config-license-cc-0, config-license-pd, config-license-gfdl, config-license-none,
+                       // config-license-cc-choose
                        $entry = $this->parent->licenses[$code];
                        if ( isset( $entry['text'] ) ) {
                                $this->setVar( 'wgRightsText', $entry['text'] );
@@ -1219,9 +1223,8 @@ class WebInstaller_Install extends WebInstallerPage {
        }
 
        public function startStage( $step ) {
-               // Give grep a chance to find the usages: config-install-database, config-install-tables,
-               // config-install-interwiki, config-install-stats, config-install-keys, config-install-sysop,
-               // config-install-mainpage
+               // Messages: config-install-database, config-install-tables, config-install-interwiki,
+               // config-install-stats, config-install-keys, config-install-sysop, config-install-mainpage
                $this->addHTML( "<li>" . wfMessage( "config-install-$step" )->escaped() . wfMessage( 'ellipsis' )->escaped() );
                if ( $step == 'extension-tables' ) {
                        $this->startLiveBox();
index 918d9b3..33e749b 100644 (file)
@@ -100,30 +100,30 @@ class DoubleRedirectJob extends Job {
                        return true;
                }
 
-               # Check for a suppression tag (used e.g. in periodically archived discussions)
+               // Check for a suppression tag (used e.g. in periodically archived discussions)
                $mw = MagicWord::get( 'staticredirect' );
                if ( $content->matchMagicWord( $mw ) ) {
                        wfDebug( __METHOD__ . ": skipping: suppressed with __STATICREDIRECT__\n" );
                        return true;
                }
 
-               # Find the current final destination
+               // Find the current final destination
                $newTitle = self::getFinalDestination( $this->redirTitle );
                if ( !$newTitle ) {
                        wfDebug( __METHOD__ . ": skipping: single redirect, circular redirect or invalid redirect destination\n" );
                        return true;
                }
                if ( $newTitle->equals( $this->redirTitle ) ) {
-                       # The redirect is already right, no need to change it
-                       # This can happen if the page was moved back (say after vandalism)
+                       // The redirect is already right, no need to change it
+                       // This can happen if the page was moved back (say after vandalism)
                        wfDebug( __METHOD__ . " : skipping, already good\n" );
                }
 
-               # Preserve fragment (bug 14904)
+               // Preserve fragment (bug 14904)
                $newTitle = Title::makeTitle( $newTitle->getNamespace(), $newTitle->getDBkey(),
                        $currentDest->getFragment(), $newTitle->getInterwiki() );
 
-               # Fix the text
+               // Fix the text
                $newContent = $content->updateRedirect( $newTitle );
 
                if ( $newContent->equals( $content ) ) {
@@ -137,13 +137,13 @@ class DoubleRedirectJob extends Job {
                        return false;
                }
 
-               # Save it
+               // Save it
                global $wgUser;
                $oldUser = $wgUser;
                $wgUser = $user;
                $article = WikiPage::factory( $this->title );
-               // Give grep a chance to find the usages:
-               // double-redirect-fixed-move, double-redirect-fixed-maintenance
+
+               // Messages: double-redirect-fixed-move, double-redirect-fixed-maintenance
                $reason = wfMessage( 'double-redirect-fixed-' . $this->reason,
                        $this->redirTitle->getPrefixedText(), $newTitle->getPrefixedText()
                )->inContentLanguage()->text();
@@ -163,7 +163,8 @@ class DoubleRedirectJob extends Job {
        public static function getFinalDestination( $title ) {
                $dbw = wfGetDB( DB_MASTER );
 
-               $seenTitles = array(); # Circular redirect check
+               // Circular redirect check
+               $seenTitles = array();
                $dest = false;
 
                while ( true ) {
index 5f4c1d2..7069d52 100644 (file)
@@ -62,9 +62,9 @@ class SpecialJavaScriptTest extends SpecialPage {
                        $out->addHtml( $summary );
                } elseif ( isset( self::$frameworks[$framework] ) ) {
                        // Matched! Display proper title and initialize the framework
-                       // Give grep a chance to find the usages: javascripttest-qunit-name
                        $out->setPageTitle( $this->msg(
                                'javascripttest-title',
+                               // Messages: javascripttest-qunit-name
                                $this->msg( "javascripttest-$framework-name" )->plain()
                        ) );
                        $out->setSubtitle( $this->msg( 'javascripttest-backlink' )
@@ -93,12 +93,12 @@ class SpecialJavaScriptTest extends SpecialPage {
        private function getFrameworkListHtml() {
                $list = '<ul>';
                foreach ( self::$frameworks as $framework => $initFn ) {
-                       // Give grep a chance to find the usages: javascripttest-qunit-name
                        $list .= Html::rawElement(
                                'li',
                                array(),
                                Linker::link(
                                        $this->getTitle( $framework ),
+                                       // Message: javascripttest-qunit-name
                                        $this->msg( "javascripttest-$framework-name" )->escaped()
                                )
                        );
index 90c0782..3de6ea2 100644 (file)
@@ -123,8 +123,7 @@ class SpecialProtectedpages extends SpecialPage {
 
                $description_items = array();
 
-               // Give grep a chance to find the usages:
-               // restriction-level-sysop, restriction-level-autoconfirmed
+               // Messages: restriction-level-sysop, restriction-level-autoconfirmed
                $protType = $this->msg( 'restriction-level-' . $row->pr_level )->escaped();
 
                $description_items[] = $protType;
@@ -151,8 +150,8 @@ class SpecialProtectedpages extends SpecialPage {
                        $stxt = $lang->getDirMark() . ' ' . Linker::formatRevisionSize( $size );
                }
 
-               # Show a link to the change protection form for allowed users otherwise
-               # a link to the protection log
+               // Show a link to the change protection form for allowed users otherwise
+               // a link to the protection log
                if ( $this->getUser()->isAllowed( 'protect' ) ) {
                        $changeProtection = Linker::linkKnown(
                                $title,
@@ -310,8 +309,7 @@ class SpecialProtectedpages extends SpecialPage {
 
                // First pass to load the log names
                foreach ( Title::getFilteredRestrictionTypes( true ) as $type ) {
-                       // Give grep a chance to find the usages:
-                       // restriction-edit, restriction-move, restriction-create, restriction-upload
+                       // Messages: restriction-edit, restriction-move, restriction-create, restriction-upload
                        $text = $this->msg( "restriction-$type" )->text();
                        $m[$text] = $type;
                }
index 540d0d0..078e7b1 100644 (file)
@@ -101,8 +101,7 @@ class SpecialProtectedtitles extends SpecialPage {
 
                $link = Linker::link( $title );
                $description_items = array();
-               // Give grep a chance to find the usages:
-               // restriction-level-sysop, restriction-level-autoconfirmed
+               // Messages: restriction-level-sysop, restriction-level-autoconfirmed
                $protType = $this->msg( 'restriction-level-' . $row->pt_create_perm )->escaped();
                $description_items[] = $protType;
                $lang = $this->getLanguage();
@@ -185,8 +184,7 @@ class SpecialProtectedtitles extends SpecialPage {
                // First pass to load the log names
                foreach ( $wgRestrictionLevels as $type ) {
                        if ( $type != '' && $type != '*' ) {
-                               // Give grep a chance to find the usages:
-                               // restriction-level-sysop, restriction-level-autoconfirmed
+                               // Messages: restriction-level-sysop, restriction-level-autoconfirmed
                                $text = $this->msg( "restriction-level-$type" )->text();
                                $m[$text] = $type;
                        }
index 26923f7..4501736 100644 (file)
@@ -563,17 +563,17 @@ class UserrightsPage extends SpecialPage {
                $allgroups = $this->getAllGroups();
                $ret = '';
 
-               # Put all column info into an associative array so that extensions can
-               # more easily manage it.
+               // Put all column info into an associative array so that extensions can
+               // more easily manage it.
                $columns = array( 'unchangeable' => array(), 'changeable' => array() );
 
                foreach ( $allgroups as $group ) {
                        $set = in_array( $group, $usergroups );
-                       # Should the checkbox be disabled?
+                       // Should the checkbox be disabled?
                        $disabled = !(
                                ( $set && $this->canRemove( $group ) ) ||
                                ( !$set && $this->canAdd( $group ) ) );
-                       # Do we need to point out that this action is irreversible?
+                       // Do we need to point out that this action is irreversible?
                        $irreversible = !$disabled && (
                                ( $set && !$this->canAdd( $group ) ) ||
                                ( !$set && !$this->canRemove( $group ) ) );
@@ -591,14 +591,14 @@ class UserrightsPage extends SpecialPage {
                        }
                }
 
-               # Build the HTML table
+               // Build the HTML table
                $ret .= Xml::openElement( 'table', array( 'class' => 'mw-userrights-groups' ) ) .
                        "<tr>\n";
                foreach ( $columns as $name => $column ) {
                        if ( $column === array() ) {
                                continue;
                        }
-                       // Give grep a chance to find the usages: userrights-changeable-col, userrights-unchangeable-col
+                       // Messages: userrights-changeable-col, userrights-unchangeable-col
                        $ret .= Xml::element( 'th', null, $this->msg( 'userrights-' . $name . '-col', count( $column ) )->text() );
                }
                $ret .= "</tr>\n<tr>\n";
@@ -635,8 +635,7 @@ class UserrightsPage extends SpecialPage {
         * @return bool Can we remove the group?
         */
        private function canRemove( $group ) {
-               // $this->changeableGroups()['remove'] doesn't work, of course. Thanks,
-               // PHP.
+               // $this->changeableGroups()['remove'] doesn't work, of course. Thanks, PHP.
                $groups = $this->changeableGroups();
                return in_array( $group, $groups['remove'] ) || ( $this->isself && in_array( $group, $groups['remove-self'] ) );
        }
index 2523814..de5853f 100644 (file)
@@ -2089,8 +2089,7 @@ class Language {
                $segments = array();
 
                foreach ( $intervals as $intervalName => $intervalValue ) {
-                       // Give grep a chance to find the usages:
-                       // duration-centuries, duration-decades, duration-years, duration-days,
+                       // Messages: duration-centuries, duration-decades, duration-years, duration-days,
                        // duration-hours, duration-minutes, duration-seconds
                        $message = wfMessage( 'duration-' . $intervalName )->numParams( $intervalValue );
                        $segments[] = $message->inLanguage( $this )->escaped();